﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:model="clr-namespace:TallyMarks.Models" 
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" 
    x:Class="TallyMarks.MainPage"
    mc:Ignorable="d" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}" 
    d:DesignHeight="768" d:DesignWidth="480">
    
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsMenuEnabled="False" >
            <shell:ApplicationBar.Buttons>
                <shell:ApplicationBarIconButton IconUri="/Images/AddIcon.png"
                                                Text="Add" Click="Add_Click"/>
                <shell:ApplicationBarIconButton IconUri="/Images/RemoveIcon.png"
                                                Text="Remove" Click="Remove_Click"/>
                <shell:ApplicationBarIconButton IconUri="/Images/ClearIcon.png"
                                                Text="Clear" Click="Clear_Click"/>                
            </shell:ApplicationBar.Buttons>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="ApplicationTitle" Text="TALLY MARKS" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="count" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid x:Name="ContentGrid" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="460"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <ScrollViewer x:Name="TallyScrollViewer">

                <controlsToolkit:WrapPanel x:Name="MarksPanel" />
                
            </ScrollViewer>

            <TextBlock x:Name="CounterTextBlock" Grid.Row="1"
                       Text="{Binding Count, Mode=OneWay}" 
                       FontSize="64" VerticalAlignment="Center" TextAlignment="Center">
            	<TextBlock.Foreground>
            		<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
            	</TextBlock.Foreground>
            </TextBlock>
            
        </Grid>

    </Grid>

</phone:PhoneApplicationPage>